
package ch.hearc.coursJava.GUI.j2D.tableAnimerHSB.j2d;

import java.awt.Graphics2D;

import ch.hearc.coursJava.GUI.j2D.tableAnimerHSB.settings.RangeeSettings;
import ch.hearc.coursJava.GUI.j2D.tableAnimerHSB.settings.Settings;

public class Rangee
	{

	/*------------------------------------------------------------------*\
	|*							Constructeurs							*|
	\*------------------------------------------------------------------*/

	public Rangee(Settings settings)
		{
		this.settings = settings.getRangeeSettings();
		this.image = new ImageHSB(settings);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	public void dessiner(Graphics2D g2d, double rayon, double alpha, double hue)
		{
		g2d.rotate(alpha);

		for(int i = 0; i < settings.getNbrImage(); i++)
			{
			g2d.translate(0, -rayon);

			this.image.fillImage(hue);
			this.image.dessiner(g2d);

			g2d.translate(0, rayon);
			g2d.rotate(settings.getdAlpha());
			}
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	/*------------------------------------------------------------------*\
	|*							Attributs Private						*|
	\*------------------------------------------------------------------*/

	// Input
	private RangeeSettings settings;

	// Tools
	private ImageHSB image;

	}
